package org.assertj.ohos.api.view;

import ohos.agp.components.VelocityDetector;
import org.assertj.core.api.AbstractAssert;

import static org.assertj.core.api.Assertions.assertThat;

/** Assertions for {@link VelocityDetector} instances. */
public class VelocityTrackerAssert extends AbstractAssert<VelocityTrackerAssert, VelocityDetector> {
  public VelocityTrackerAssert(VelocityDetector actual) {
    super(actual, VelocityTrackerAssert.class);
  }

  public VelocityTrackerAssert hasXVelocity(float velocity) {
    isNotNull();
    float actualVelocity = actual.getHorizontalVelocity();
    assertThat(actualVelocity) //
        .overridingErrorMessage("Expected X velocity <%s> but was <%s>", velocity,
            actualVelocity) //
        .isEqualTo(velocity);
    return this;
  }
/* // TODO: wang, not found in ohos
  public VelocityTrackerAssert hasXVelocity(int id, float velocity) {
    isNotNull();
    float actualVelocity = actual.getXVelocity(id);
    assertThat(actualVelocity) //
        .overridingErrorMessage("Expected X velocity <%s> with ID %s but was <%s>", velocity, id,
            actualVelocity) //
        .isEqualTo(velocity);
    return this;
  }*/

  public VelocityTrackerAssert hasYVelocity(float velocity) {
    isNotNull();
    float actualVelocity = actual.getVerticalVelocity();
    assertThat(actualVelocity) //
        .overridingErrorMessage("Expected Y velocity <%s> but was <%s>", velocity,
            actualVelocity) //
        .isEqualTo(velocity);
    return this;
  }
/* // TODO: wang, not found in ohos
  public VelocityTrackerAssert hasYVelocity(int id, float velocity) {
    isNotNull();
    float actualVelocity = actual.getYVelocity(id);
    assertThat(actualVelocity) //
        .overridingErrorMessage("Expected Y velocity <%s> with ID %s but was <%s>", velocity, id,
            actualVelocity) //
        .isEqualTo(velocity);
    return this;
  }*/
}
